package com.cj;

/**
 * @author cc
 * @date 2025-05-23 10:39
 **/

public class MysqlDialect implements Dialect{
    @Override
    public boolean supportPage() {
        return false;
    }

    @Override
    public String getPagingSql(String sql, int offset, int limit) {

        sql=sql.trim();


       StringBuilder result=new StringBuilder(sql.length()+100);

       result.append(sql).append(" limit ");

       if (offset>0){
           result.append(offset).append(",").append(limit);
       }else{
           result.append(limit);
       }

       return result.toString();
    }
}
